drop table spmi_ods.spmi_transfer_msg_err_log ;
CREATE EXTERNAL TABLE IF NOT EXISTS spmi_ods.spmi_transfer_msg_err_log(
id                                                 bigint                         COMMENT '主键ID',
waybill_id                                         String                         COMMENT '运单号',
body                                               String                         COMMENT '消息体',
msg_type                                           smallint                       COMMENT '消息类型:(1:到件消息, 2:发件消息, 3:录单消息, 4:签收消息, 5:退件消息, 6:算费消息)',
msg_status                                         smallint                       COMMENT '消息状态:(1:未处理, 2:已处理, 3:作废)',
error_msg                                          String                         COMMENT '错误信息',
create_time                                        timestamp                      COMMENT '创建时间',
update_time                                        timestamp                      COMMENT '修改时间'
)
COMMENT ''
PARTITIONED BY (dt STRING COMMENT '更新/创建日期 (yyyy-MM-dd)')
STORED AS PARQUET
LOCATION '/dw/hive/spmi_ods.db/external/spmi_transfer_msg_err_log'
TBLPROPERTIES (
  'parquet.column.index.access'='true'
) ;